﻿using System.Collections.Generic;
using Rodunu.Movies.Services.Models.Netflix.Attributes;

namespace Rodunu.Movies.Services.Models.Netflix
{
    public class QueueUpdateStatus : Status
    {
        private List<QueueItem> _resourcesCreated = new List<QueueItem>();
        private List<Link> _failedEntries = new List<Link>();
        private List<Link> _alreadyInQueue = new List<Link>();

        [XPath("/status/sub_code/text()")]
        public int SubCode { get; set; }

        [XPath("/status/etag/text()")]
        public long ETag { get; set; }

        [XPath("/status/resources_created/queue_item")]
        public List<QueueItem> ResourcesCreated
        {
            get { return _resourcesCreated; }
            set { _resourcesCreated = value; }
        }

        [XPath("/status/failed_title_refs/link")]
        public List<Link> FailedEntries
        {
            get { return _failedEntries; }
            set { _failedEntries = value; }
        }

        [XPath("/status/already_in_queue/link")]
        public List<Link> AlreadyInQueue
        {
            get { return _alreadyInQueue; }
            set { _alreadyInQueue = value; }
        }
    }
}